// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc             v3.20.0
// source: protos/sharding_rules.proto

package proto

import (
	context "context"
	grpc "google.golang.org/grpc"
	codes "google.golang.org/grpc/codes"
	status "google.golang.org/grpc/status"
)

// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7

// ShardingRulesServiceClient is the client API for ShardingRulesService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type ShardingRulesServiceClient interface {
	AddShardingRules(ctx context.Context, in *AddShardingRuleRequest, opts ...grpc.CallOption) (*AddShardingRuleReply, error)
	DropShardingRules(ctx context.Context, in *DropShardingRuleRequest, opts ...grpc.CallOption) (*DropShardingRuleReply, error)
	ListShardingRules(ctx context.Context, in *ListShardingRuleRequest, opts ...grpc.CallOption) (*ListShardingRuleReply, error)
}

type shardingRulesServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewShardingRulesServiceClient(cc grpc.ClientConnInterface) ShardingRulesServiceClient {
	return &shardingRulesServiceClient{cc}
}

func (c *shardingRulesServiceClient) AddShardingRules(ctx context.Context, in *AddShardingRuleRequest, opts ...grpc.CallOption) (*AddShardingRuleReply, error) {
	out := new(AddShardingRuleReply)
	err := c.cc.Invoke(ctx, "/spqr.ShardingRulesService/AddShardingRules", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *shardingRulesServiceClient) DropShardingRules(ctx context.Context, in *DropShardingRuleRequest, opts ...grpc.CallOption) (*DropShardingRuleReply, error) {
	out := new(DropShardingRuleReply)
	err := c.cc.Invoke(ctx, "/spqr.ShardingRulesService/DropShardingRules", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *shardingRulesServiceClient) ListShardingRules(ctx context.Context, in *ListShardingRuleRequest, opts ...grpc.CallOption) (*ListShardingRuleReply, error) {
	out := new(ListShardingRuleReply)
	err := c.cc.Invoke(ctx, "/spqr.ShardingRulesService/ListShardingRules", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// ShardingRulesServiceServer is the server API for ShardingRulesService service.
// All implementations must embed UnimplementedShardingRulesServiceServer
// for forward compatibility
type ShardingRulesServiceServer interface {
	AddShardingRules(context.Context, *AddShardingRuleRequest) (*AddShardingRuleReply, error)
	DropShardingRules(context.Context, *DropShardingRuleRequest) (*DropShardingRuleReply, error)
	ListShardingRules(context.Context, *ListShardingRuleRequest) (*ListShardingRuleReply, error)
	mustEmbedUnimplementedShardingRulesServiceServer()
}

// UnimplementedShardingRulesServiceServer must be embedded to have forward compatible implementations.
type UnimplementedShardingRulesServiceServer struct {
}

func (UnimplementedShardingRulesServiceServer) AddShardingRules(context.Context, *AddShardingRuleRequest) (*AddShardingRuleReply, error) {
	return nil, status.Errorf(codes.Unimplemented, "method AddShardingRules not implemented")
}
func (UnimplementedShardingRulesServiceServer) DropShardingRules(context.Context, *DropShardingRuleRequest) (*DropShardingRuleReply, error) {
	return nil, status.Errorf(codes.Unimplemented, "method DropShardingRules not implemented")
}
func (UnimplementedShardingRulesServiceServer) ListShardingRules(context.Context, *ListShardingRuleRequest) (*ListShardingRuleReply, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ListShardingRules not implemented")
}
func (UnimplementedShardingRulesServiceServer) mustEmbedUnimplementedShardingRulesServiceServer() {}

// UnsafeShardingRulesServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to ShardingRulesServiceServer will
// result in compilation errors.
type UnsafeShardingRulesServiceServer interface {
	mustEmbedUnimplementedShardingRulesServiceServer()
}

func RegisterShardingRulesServiceServer(s grpc.ServiceRegistrar, srv ShardingRulesServiceServer) {
	s.RegisterService(&ShardingRulesService_ServiceDesc, srv)
}

func _ShardingRulesService_AddShardingRules_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(AddShardingRuleRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ShardingRulesServiceServer).AddShardingRules(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/spqr.ShardingRulesService/AddShardingRules",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ShardingRulesServiceServer).AddShardingRules(ctx, req.(*AddShardingRuleRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _ShardingRulesService_DropShardingRules_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(DropShardingRuleRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ShardingRulesServiceServer).DropShardingRules(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/spqr.ShardingRulesService/DropShardingRules",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ShardingRulesServiceServer).DropShardingRules(ctx, req.(*DropShardingRuleRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _ShardingRulesService_ListShardingRules_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ListShardingRuleRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ShardingRulesServiceServer).ListShardingRules(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/spqr.ShardingRulesService/ListShardingRules",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ShardingRulesServiceServer).ListShardingRules(ctx, req.(*ListShardingRuleRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// ShardingRulesService_ServiceDesc is the grpc.ServiceDesc for ShardingRulesService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var ShardingRulesService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "spqr.ShardingRulesService",
	HandlerType: (*ShardingRulesServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "AddShardingRules",
			Handler:    _ShardingRulesService_AddShardingRules_Handler,
		},
		{
			MethodName: "DropShardingRules",
			Handler:    _ShardingRulesService_DropShardingRules_Handler,
		},
		{
			MethodName: "ListShardingRules",
			Handler:    _ShardingRulesService_ListShardingRules_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "protos/sharding_rules.proto",
}
